package recursion;

public class HanNuoTa {
    static void hanoiTower(int N, String from, String to, String help) {
        if (N == 1) {
            System.out.println("move " + N + " from " + from + " to " + to);
            return;
        }
        hanoiTower(N - 1, from, help, to);
        System.out.println("move " + N + " from " + from + " to " + to);
        hanoiTower(N - 1, help, to, from);
    }

    public static void main(String[] args) {
        hanoiTower(3, "A", "C", "B");
    }
}
